import React, { useEffect, FC } from 'react'
import { useHistory } from 'react-router-dom'
import { LockOutlined, UserOutlined } from '@ant-design/icons'
import { Form, Input, Button, message } from 'antd'
import ReactCanvasNest from 'react-canvas-nest'
import './login.less'
import Logo from '@/assets/img/logo.png'
import { setUserInfo } from '@/assets/js/publicFunc'
import { connect } from 'react-redux'
import * as actions from '@/store/actions'
import CommonApi from '@/api/common'
import menus, { getMenuList } from '@/config/menu'

import Png1 from './1.png'
import Png2 from './2.png'
import Png3 from './3.png'
import Png4 from './4.png'
import Png5 from './5.png'
import Png6 from './6.png'
import Png7 from './7.png'
import Png8 from './8.png'
import Png9 from './9.png'
interface Props extends ReduxProps { }
const LoginForm: FC<Props> = ({
}) => {
  const to = (index)=>{
    var urlContent = {
      1:'http://200.2.11.23:32001',//用户登录权限管理系统
      2:'http://200.2.11.23:32020',//一站式开发平台
      3:'http://200.2.11.23:32000',//大数据中台
      4:'http://200.2.11.23:32003',//数据质量
      5:'http://200.2.11.23:32004',//数据标准
      6:'http://200.2.11.23:32006',//元数据
      7:'http://200.2.11.23:8980/etlaweb/login.jsp',//任务调度
      8:'http://200.2.11.11:9099/',//数据共享交换平台sdx
      9:'http://200.2.11.17:12345/dolphinscheduler',//dolphinscheduler
    }
    console.log(index);
    var url = urlContent[index];

    window.open(url)
  }
  return (
    <div className="routerpage">
      <div className="title">
        鹏飞数仓管理平台
        <div className="leftimg"></div>
        <div className="rightimg"></div>
      </div>
      <div className="content">
        <div className="item"  onClick={()=>to(1)}>
          <img src={Png4} alt="" />
            <div className="desc">用户登录权限管理系统</div>
        </div>
        <div className="item" onClick={()=>to(2)}>
          <img src={Png5} alt="" />
            <div className="desc">一站式开发平台</div>
        </div>
        <div className="item" onClick={()=>to(3)}>
          <img src={Png3} alt="" />
            <div className="desc">大数据中台    </div>
        </div>
        <div className="item" onClick={()=>to(4)}>
          <img src={Png6} alt="" />
            <div className="desc">数据质量</div>
        </div>
        <div className="item" onClick={()=>to(5)}>
          <img src={Png7} alt="" />
            <div className="desc">数据标准</div>
        </div>
        <div className="item" onClick={()=>to(6)}>
          <img src={Png8} alt="" />
            <div className="desc">元数据</div>
        </div>
        <div className="item" onClick={()=>to(7)}>
          <img src={Png1} alt="" />
            <div className="desc">任务调度</div>
        </div>
        <div className="item" onClick={()=>to(8)}>
          <img src={Png2} alt="" />
            <div className="desc">SDX</div>
        </div>
        <div className="item" onClick={()=>to(9)}>
          <img src={Png9} alt="" />
            <div className="desc">dolphinscheduler</div>
        </div>
       
      </div>
    </div>
  )
}

export default connect(
  (state) => state,
  actions
)(LoginForm)
